home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
BIOSDOS.LZH
/
DOSREF2.CRD
< prev
next >
Wrap
Text File
|
1987-08-13
|
32KB
|
245 lines
SAU
| |
7 INT 21 - FUNCTION REQUEST (CONT.) | 8 ┌───────────────────────────────┐ |
| │ PROGRAM SEGMENT PREFIX LAYOUT │ |
AH = 5C - LOCK/UNLOCK FILE ACCESS | └───────────────────────────────┘ |
INPUT: AL = 00 TO LOCK; AL=01 TO UNLOCK | |
BX = FILE HANDLE | BYTE FUNCTION |
CX = OFFSET HIGH | |
DX = OFFSET LOW | 00-01 - INT 20 INSTRUCTION |
SI = LENGTH HIGH | 02-03 - TOP OF MEMORY IN SEGMENT (PARAGRAPH) FORM |
DI = LENGTH LOW | 04 - RESERVED |
OUTPUT: AX = ERROR CODE IF CARRY SET | 05-09 - LONG CALL TO THE DOS FUNCTION DISPATCHER |
| (06-07 - NUMBER OF BYTES AVAILABLE IN THIS SEGMENT) |
AH = 62 - GET PROGRAM SEGMENT PREFIX ADDRESS | 0A-0D - TERMINATE ADDRESS (IP,CS) |
INPUT: NONE | 0E-11 - CTL-BREAK EXIT ADDRESS (IP,CS) |
OUTPUT: BX = SEGMENT ADDRESS OF CURRENT PROCESS | 12-15 - CRITICAL ERROR EXIT ADDRESS (IP,CS) |
| 16-2B - USED BY DOS |
| 2C-2D - SEGMENT ADDRESS OF THE ENVIRONMENT |
┌────────────────────────────┐ | 2E-5B - USED BY DOS |
│ INT 22 - PROGRAM TERMINATE │ | 5C-6B - FORMATTED AS A STANDARD UNOPENED FCB |
└────────────────────────────┘ | 6C-7F - FORMATTED AS A STANDARD UNOPENED FCB |
| 80 - NUMBER OF CHARACTERS ENTERED AFTER FILENAME |
INPUT: NONE. DO NOT EXECUTE THIS INTERRUPT DIRECTLY. | 81-FF - ALL CHARACTERS ENTERED AFTER THE FILENAME |
SEE DOS MANUAL FOR MORE INFORMATION. | |
| |
| ┌─────────────────────┐ |
┌─────────────────────────────────┐ | │ DIRECTORY STRUCTURE │ |
│ INT 23 - CTL BREAK EXIT ADDRESS │ | └─────────────────────┘ |
└─────────────────────────────────┘ | |
| BYTE DESCRIPTION |
INPUT: NONE. DO NOT EXECUTE THIS INTERRUPT DIRECTLY. | |
SEE DOS MANUAL FOR MORE INFORMATION. | 00 - FILENAME STATUS: |
| 00 = FILENAME NEVER USED |
| 05 = FIRST CHARACTER OF FILENAME IS E5 |
┌─────────────────────────────────┐ | E5 = FILE HAS BEEN ERASED |
│ INT 24 - CRITICAL ERROR HANDLER │ | 2E = THIS IS A SUBDIRECTORY ENTRY |
└─────────────────────────────────┘ | 00-07 - FILENAME, LEFT JUSTIFIED |
| 08-0A - FILENAME EXTENTION, LEFT JUSTIFIED |
INPUT: NONE. DO NOT EXECUTE THIS INTERRUPT DIRECTLY. | 0B - FILE'S ATTRIBUTE: |
SEE DOS MANUAL FOR MORE INFORMATION. | ┌─┬─┬─┬─┬─┬─┬─┬─┐ |
| │7│6│5│4│3│2│1│0│ BYTE 0B |
| └─┴─┴─┴─┴─┴─┴─┴─┘ |
┌─────────────────────────────┐ | │ │ │ │ │ │ │ │ |
│ INT 25 - ABSOLUTE DISK READ │ | │ │ │ │ │ │ │ └───── READ ONLY |
└─────────────────────────────┘ | │ │ │ │ │ │ └─────── HIDDEN |
| │ │ │ │ │ └───────── SYSTEM |
INPUT: AL = DRIVE NUMBER (0=A) | │ │ │ │ └─────────── VOLUME LABEL |
CX = NUMBER OF SECTORS TO READ | │ │ │ └───────────── SUBDIRECTORY |
DX = BEGINNING LOGICAL SECTOR NUMBER | │ │ └─────────────── ARCHIVE |
DS:BX = TRANSFER ADDRESS | └─┴───────────────── UNUSED |
OUTPUT: AL = DOS ERROR CODE IF CARRY SET | 0C-15 - RESERVED BY DOS |
AH = BIOS ERROR CODE IF CARRY SET: | 16-17 - TIME THE FILE WAS CREATED OR LAST UPDATED: |
80 = ATTACHMENT FAILED TO RESPOND | ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ |
40 = SEEK FAILED | │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│ 17,16 |
08 = BAD CRC ON DISKETTE | └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ |
04 = SECTOR NOT FOUND | │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─ SECONDS/2 |
03 = WRITE PROTECT | │ │ │ │ │ └─┴─┴─┴─┴─┴─────────── MINUTES |
02 = OTHER ERROR | └─┴─┴─┴─┴─────────────────────── HOURS |
NOTE: CALLER FLAGS RETURNED ON STACK | 18-19 - DATE THE FILE WAS CREATED OR LAST UPDATED: |
| ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ |
┌──────────────────────────────┐ | │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│ 19,18 |
│ INT 26 - ABSOLUTE DISK WRITE │ | └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ |
└──────────────────────────────┘ | │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─ DAY 1-31 |
| │ │ │ │ │ │ │ └─┴─┴─┴─────────── MONTH 1-12 |
INPUT: AL = DRIVE NUMBER (0=A) | └─┴─┴─┴─┴─┴─┴─────────────────── YEAR + 1980 |
CX = NUMBER OF SECTORS TO WRITE | 1A-1B - STARTING CLUSTER NUMBER OF THE FIRST CLUSTER |
DX = BEGINNING LOGICAL SECTOR NUMBER | OF THE FILE |
DS:BX = TRANSFER ADDRESS | 1C-1F - FILE SIZE IN BYTES (LOW ORDER FIRST) |
OUTPUT: AL = DOS ERROR CODE IF CARRY SET | |
AH = BIOS ERROR CODE IF CARRY SET: | |
80 = ATTACHMENT FAILED TO RESPOND | ┌─────────────────────────────────┐ |
40 = SEEK FAILED | │ FILE CONTROL BLOCK (FCB) LAYOUT │ |
08 = BAD CRC ON DISKETTE | └─────────────────────────────────┘ |
04 = SECTOR NOT FOUND | |
03 = WRITE PROTECT | BYTE FUNCTION |
02 = OTHER ERROR | |
NOTE: CALLER FLAGS RETURNED ON STACK | -7 FLAG CONTAINING FF IF THIS IS AN EXTENDED FCB |
| -6 TO -2 RESERVED |
┌──────────────────────────────────────┐ | -1 DIRECTORY ATTRIBUTE BYTE |
│ INT 27 - TERMINATE BUT STAY RESIDENT │ | 0 DRIVE NUMBER (0 FOR DEFAULT DRIVE) |
└──────────────────────────────────────┘ | 1 TO 8 FILENAME, LEFT JUSTIFIED WITH TRAILING BLANKS |
| 9 TO 11 FILENAME EXTENSION, LEFT JUSTIFIED W/BLANKS |
INPUT: DS:DX = PROGRAM'S LAST ADDRESS PLUS ONE | 12,13 CURRENT BLOCK NUMBER RELATIVE TO START OF FILE|
OUTPUT: NONE | 14,15 LOGICAL RECORD SIZE IN BYTES |
| 16 TO 19 FILE SIZE IN BYTES |
| 20,21 DATE THE FILE WAS CREATED OR LAST UPDATED |
┌──────────────────────────────┐ | ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ |
│ INT 2F - PRINT.COM INTERFACE │ | │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│ 21,20 |
└──────────────────────────────┘ | └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ |
| │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─ DAY 1-31 |
AL = 00 - GET INSTALLED STATE | │ │ │ │ │ │ │ └─┴─┴─┴─────────── MONTH 1-12 |
INPUT: NONE | └─┴─┴─┴─┴─┴─┴─────────────────── YEAR + 1980 |
OUTPUT: AL = 00 IF NOT INSTALLED, OK TO INSTALL | |
AL = 01 IF NOT INSTALLED, NOT OK TO INSTALL | 22 TO 31 RESERVED FOR SYSTEM USE |
AL = FF IF INSTALLED | 32 CURRENT RELATIVE RECORD NUMBER WITHIN CURRENT |
| BLOCK |
AL = 01 - SUBMIT FILE | 22 TO 36 RELATIVE RECORD NUMBER FROM START OF FILE |
INPUT: DS:DX = POINTER TO A SUBMIT PACKET CONSISTING | |
OF THE LEVEL (BYTE) AND A DWORD | NOTE: POINT TO BYTE 0 FOR STANDARD FILE CONTROL BLOCK, |
POINTER TO AN ASCIIZ PATH/FILENAME | POINT TO BYTE "-7" FOR EXTENDED FILE CONTROL BLOCK|
OUTPUT: NONE | |
| |
AL = 02 - CANCEL FILE | ┌────────────────────┐ |
INPUT: DS:DX = POINTER TO ASCIIZ FILENAME TO CANCEL | │ BOOT SECTOR LAYOUT │ |
OUTPUT: NONE | └────────────────────┘ |
│ | |
AL = 03 - CANCEL ALL FILES │ ---- ERROR CODES ---- | OFFSET SIZE DESCRIPTION |
INPUT: NONE │ | 00 3 BYTES JUMP TO EXECUTABLE CODE |
OUTPUT: NONE │ 01 - INVALID FUNCTION | 03 8 BYTES OEM NAME AND VERSION |
│ 02 - FILE NOT FOUND | 0B 1 WORD BYTES PER SECTOR |
AL = 04 - PAUSE / RETURN STATUS │ 03 - PATH NOT FOUND | 0D 1 BYTE SECTORS PER ALLOCATION UNIT |
INPUT: NONE │ 04 - TOO MANY FILES | 0E 1 WORD RESERVED SECTORS (STARTING AT 0) |
OUTPUT: DX = ERROR COUNT │ 05 - ACCESS DENIED | 10 1 BYTE NUMBER OF FATS |
DS:SI = POINTER TO │ 08 - QUEUE FULL | 11 1 WORD NUMBER OF ROOT DIR. ENTRIES ALLOWED |
PRINT QUEUE │ 09 - BUSY | 13 1 WORD TOTAL NUMBER OF SECTORS IN MEDIA |
│ 0C - NAME TOO LONG | 15 1 BYTE MEDIA DESCRIPTOR |
AL = 05 - END OF STATUS │ 0F - INVALID DRIVE | 16 1 WORD NUMBER OF SECTORS PER FAT |
INPUT: NONE │ | 18 1 WORD SECTORS PER TRACK |
OUTPUT: AX = ERROR CODE │ | 1A 1 WORD NUMBER OF HEADS |
| 1C 1 WORD NUMBER OF HIDDEN SECTORS |
| |
5 INT 21 - FUNCTION REQUEST (CONT.) | |
| 6 INT 21 - FUNCTION REQUEST (CONT.) |
AH = 2F - GET DISK TRANSFER ADDRESS (DTA) | |
INPUT: NONE | AH = 43 - CHANGE FILE MODE |
OUTPUT: ES:BX = THE CURRENT DTA | INPUT: DS:DX = POINTER TO AN ASCIIZ PATH NAME |
| CX = ATTRIBUTE |
AH = 30 - GET DOS VERSION NUMBER | AL = 00 TO GET ATTRIBUTE; 01 TO SET |
INPUT: NONE | OUTPUT: AX = ERROR CODE IF CARRY SET |
OUTPUT: AL = MAJOR VERSION NUMBER (LEFT OF DECIMAL) | CX = THE ATTRIBUTE |
AH = MINOR VERSION NUMBER (RIGHT OF DECIMAL) | |
BX,CX = 0000 | AH = 44 - I/O CONTROL FOR DEVICES |
| INPUT: DS:DX = DATA OR BUFFER |
AH = 31 - TERMINATE PROCESS AND REMAIN RESIDENT | CX = NUMBER OF BYTES TO READ OR WRITE |
INPUT: AL = EXIT CODE (RETURNED TO BATCH FILES) | BX = FILE HANDLE |
DX = THE MEMORY SIZE IN PARAGRAPHS | BL = DEVICE NUMBER (0=DEFAULT) |
OUTPUT: NONE | AL = FUNCTION VALUE |
| OUTPUT: AX = ERROR CODE IF CARRY SET |
AH = 33 - GET/SET CTL-BREAK CHECK STATE | AX = # OF BYTES XFERRED IF CARRY NOT SET |
INPUT: AL = 00 TO REQUEST CURRENT STATE | NOTE: SEE DOS MANUAL FOR FUNCTION VALUES |
AL = 01 TO SET CURRENT STATE | |
DL = 00 TO SET STATE OFF; DL=01 TO SET ON | AH = 45 - DUPLICATE A FILE HANDLE |
OUTPUT: DL = THE CURRENT STATE (00=OFF, 01=ON) | INPUT: BX = FILE HANDLE |
| OUTPUT: AX = ERROR CODE IF CARRY SET |
AH = 35 - GET VECTOR | AX = NEW FILE HANDLE IF CARRY NOT SET |
INPUT: AL = VECTOR NUMBER | |
OUTPUT: ES:BX = POINTER TO INTERRUPT HANDLER | AH = 46 - FORCE A DUPLICATE OF A FILE HANDLE |
| INPUT: BX = EXISTING FILE HANDLE |
AH = 36 - GET DISK FREE SPACE | CX = SECOND FILE HANDLE |
INPUT: DL = DRIVE NUMBER (0=DEFAULT) | OUTPUT: AX = ERROR CODE IF CARRY SET |
OUTPUT: BX = AVAILABLE CLUSTERS | |
DX = CLUSTERS PER DRIVE | AH = 47 - GET THE CURRENT DIRECTORY |
CX = BYTES PER SECTOR | INPUT: DS:SI = POINTER TO A 64 BYTE USER AREA |
AX = FFFF IF DRIVE HAS INVALID SECTORS/CLUSTER | DL = DRIVE NUMBER (0=DEFAULT) |
| OUTPUT: DS:SI = POINTER TO PATH NAME FROM ROOT |
AH = 38 - GET COUNTRY DEPENDENT INFORMATION | AX = ERROR CODE IF CARRY SET |
INPUT: DS:DX = POINTER TO BUFFER FOR RETURNED DATA | |
AL = 00 TO GET CURRENT COUNTRY INFORMATION | AH = 48 - ALLOCATE MEMORY |
AL = 01-FE FOR COUNTRY CODES < 255 | INPUT: BX = # OF PARAGRAPHS OF MEMORY REQUESTED |
AL = FF FOR COUNTRY CODES >255 | OUTPUT: AX:0 = POINTER TO ALLOCATED MEMORY BLOCK |
BX = COUNTRY CODE IF AL = FF | AX = ERROR CODE IF CARRY SET |
OUTPUT: AX = ERROR CODE IF CARRY SET | BX = SIZE OF THE LARGEST BLOCK OF MEMORY |
DS:DX = POINTER TO BUFFER OF RETURNED DATA | AVAILABLE (PARAGRAPHS) IF CARRY SET |
BX = COUNTRY CODE | |
| AH = 49 - FREE ALLOCATED MEMORY |
AH = 38 - SET CURRENT COUNTRY | INPUT: ES = SEGMENT OF THE BLOCK TO BE RETURNED |
INPUT: DX = FFFF | OUTPUT: AX = ERROR CODE IF CARRY SET |
AL = 01-FE FOR COUNTRY CODES < 255 | |
AL = FF FOR COUNTRY CODES >255 | AH = 4A - MODIFY ALLOCATED MEMORY BLOCKS |
BX = COUNTRY CODE IF AL = FF | INPUT: ES = THE SEGMENT OF THE BLOCK |
OUTPUT: AX = ERROR CODE IF CARRY SET | BX = REQUESTED BLOCK SIZE IN PARAGRAPHS |
| OUTPUT: AX = ERROR CODE IF CARRY SET |
NOTE: SEE DOS MANUAL FOR COUNTRY INFORMATION | BX = MAXIMUM SIZE POSSIBLE IF CARRY SET |
BUFFER LAYOUT AND COUNTRY CODES | |
| AH = 4B - LOAD OR EXECUTE A PROGRAM |
AH = 39 - CREATE SUBDIRECTORY (MKDIR) | INPUT: DS:DX = POINTER TO AN ASCIIZ FILENAME |
INPUT: DS:DX = POINTER TO ASCIIZ PATH NAME | ES:BX = POINTER TO A PARAMETER BLOCK |
OUTPUT: AX = ERROR CODE IF CARRY SET | AL = 00 TO LOAD AND EXECUTE PROGRAM |
| AL = 03 TO JUST LOAD |
AH = 3A - REMOVE SUBDIRECTORY (RMDIR) | OUTPUT: AX = ERROR CODE IF CARRY SET |
INPUT: DS:DX = POINTER TO ASCIIZ PATH NAME | |
OUTPUT: AX = ERROR CODE IF CARRY SET | AH = 4C - TERMINATE A PROCESS |
| INPUT: AL = RETURN CODE (FOR BATCH FILES) |
AH = 3B - CHANGE THE CURRENT DIRECTORY (CHDIR) | OUTPUT: NONE |
INPUT: DS:DX = POINTER TO ASCIIZ PATH NAME | |
OUTPUT: AX = ERROR CODE IF CARRY SET | AH = 4D - GET THE RETURN CODE OF A SUB-PROCESS |
| INPUT: NONE |
AH = 3C - CREATE A FILE | OUTPUT: AL = EXIT CODE SENT BY SUB-PROCESS |
INPUT: DS:DX = POINTER TO ASCIIZ PATH NAME | AH = 00 FOR NORMAL TERMINATION |
CX = THE ATTRIBUTE OF THE FILE | AH = 01 IF TERMINATED BY CTL-BREAK |
OUTPUT: AX = ERROR CODE IF CARRY SET | AH = 02 IF CRITICAL DEVICE ERROR |
AX = FILE'S HANDLE IF CARRY NOT SET | AH = 03 IF TERMINATED BY FUNCTION REQ. 31 |
| |
AH = 3D - OPEN A FILE | AH = 4E - FIND FIRST MATCHING FILE |
INPUT: DS:DX = POINTER TO AN ASCIIZ PATH NAME | INPUT: DS:DX = POINTER TO ASCIIZ PATH/FILENAME |
┌─┬─┬─┬─┬─┬─┬─┬─┐ | CX = ATTRIBUTE USED DURING SEARCH |
AL = │7│6│5│4│3│2│1│0│ OPEN MODE | OUTPUT: AX = ERROR CODE IF CARRY SET |
└─┴─┴─┴─┴─┴─┴─┴─┘ | |
│ │ │ │ │ │ │ │ | AH = 4F - FIND NEXT MATCHING FILE |
│ │ │ │ │ └─┴─┴───── ACCESS MODE | INPUT: DS:DX = UNCHANGED FROM PREVIOUS FUNCTION 4E|
│ │ │ │ └─────────── ALWAYS 0 | OUTPUT: AX = ERROR CODE IF CARRY SET |
│ └─┴─┴───────────── SHARING MODE | |
└─────────────────── INHERITANCE FLAG | AH = 54 - GET VERIFY SETTING |
(SEE DOS MANUAL FOR BIT VALUES) | INPUT: NONE |
OUTPUT: AX = ERROR CODE IF CARRY SET | OUTPUT: AL = 00 IF VERIFY OFF, AL=01 IF VERIFY ON |
AX = FILE HANDLE IF CARRY NOT SET | |
| AH = 56 - RENAME A FILE |
AH = 3E - CLOSE A FILE HANDLE | INPUT: DS:DX = POINTER TO OLD ASCIIZ PATH/FILENAME|
INPUT: BX = THE FILE HANDLE TO CLOSE | ES:DI = POINTER TO NEW ASCIIZ PATH/FILENAME|
OUTPUT: AX = ERROR CODE IF CARRY SET | OUTPUT: AX = ERROR CODE IF CARRY SET |
| |
AH = 3F - READ FROM A FILE OR DEVICE | AH = 57 - GET/SET A FILE'S DATE AND TIME |
INPUT: BX = FILE HANDLE | INPUT: AL = 00 TO GET; AL=01 TO SET |
DS:DX = POINTER TO READ BUFFER | BX = FILE'S HANDLE |
CX = NUMBER OF BYTES TO READ | CX = TIME TO BE SET |
OUTPUT: AX = ERROR CODE IF CARRY SET | DX = DATE TO BE SET |
AX = NUMBER OF BYTES READ IF CARRY NOT SET | OUTPUT: AX = ERROR CODE IF CARRY SET |
| CX = FILE'S TIME FROM TABLE |
AH = 40 - WRITE TO A FILE OR DEVICE | DX = FILE'S DATE FROM TABLE |
INPUT: BX = FILE HANDLE | |
DS:DX = POINTER TO WRITE BUFFER | AH = 59 - GET EXTENDED ERROR INFORMATION |
CX = NUMBER OF BYTES TO WRITE | INPUT: BX = 00 FOR VERSIONS 3.0, 3.1, 3.2 |
OUTPUT: AX = ERROR CODE IF CARRY SET | OUTPUT: AX = EXTENDED ERROR CODE (SEE PANEL 1) |
AX = NUMBER OF BYTES WRITTEN IF CARRY NOT SET | BH = ERROR CLASS (SEE PANEL 1) |
| BL = SUGGESTED ACTION (SEE PANEL 1) |
AH = 41 - DELETE A FILE FROM A SPECIFIED DIRECTORY | CH = LOCUS (SEE PANEL 1) |
INPUT: DS:DX = POINTER TO AN ASCIIZ FILENAME | |
OUTPUT: AX = ERROR CODE IF CARRY SET | AH = 5A - CREATE A TEMPORARY FILE |
| INPUT: DS:DX = POINTER TO ASCIIZ PATH ENDING IN \ |
AH = 42 - MOVE FILE READ/WRITE POINTER | CX = ATTRIBUTE |
INPUT: CX:DX = DISTANCE TO MOVE IN BYTES (OFFSET) | OUTPUT: AX = ERROR CODE IF CARRY SET |
AL = ORIGIN OF MOVE: | DS:DX = POINTER TO ASCIIZ PATH/FILENAME |
00 = BEGINNING OF FILE PLUS OFFSET | |
01 = CURRENT LOCATION PLUS OFFSET | AH = 5B - CREATE A NEW FILE |
02 = END OF FILE PLUS OFFSET | INPUT: DS:DX = POINTER TO ASCIIZ PATH/FILENAME |
BX = THE FILE'S HANDLE | CX = ATTRIBUTE |
OUTPUT: AX = ERROR CODE IF CARRY SET | OUTPUT: AX = ERROR CODE IF CARRY SET |
DX:AX = NEW POINTER LOCATION IF CARRY NOT SET | AX = HANDLE IF CARRY NOT SET |
| |
CONTINUED ON NEXT PANEL | CONTINUED ON NEXT PANEL |
| |